<template>
	<view class="container">
		<web-view :src="url"  ></web-view>
	</view>
</template>

<script>
	export default {
		data(){
			return {
				title:"",
				CompanyId:"",
				token:"",
				// url:"https://hzq.yoojet.com/#/App/Statistics/AppSales" 
				url:"http://shq.yoojet.com/#/App/Statistics/AppSales"   
			}
		},
		
		onLoad(options) {
			uni.showLoading({
				title:"加载中"
			})
			console.log('获取最终传递过来的options',options)
			// 动态修改顶部标题
			uni.setNavigationBarTitle({
				title:options.title
			})
			this.title=options.title
			this.CompanyId= options.CompanyId
			this.token= options.token
			if(this.title === '收款统计'){
				this.url=this.$webUrl+"/#/App/Statistics/AppSales?CompanyId="+this.CompanyId +'&token='+this.token
			}else if(this.title === '销售统计'){
				this.url=this.$webUrl+"/#/App/Statistics/AppSellings?CompanyId="+this.CompanyId +'&token='+this.token
			} else if(this.title === '欠款统计'){
				this.url=this.$webUrl+"/#/App/Statistics/AppBalance?CompanyId="+this.CompanyId +'&token='+this.token
			} else if(this.title === '逾期统计'){
				this.url=this.$webUrl+"/#/App/Statistics/AppOverdues?CompanyId="+this.CompanyId +'&token='+this.token
			}else if(this.title ==='逾期天数统计'){
				this.url=this.$webUrl+"/#/App/Statistics/AppOverdueDays?CompanyId="+this.CompanyId +'&token='+this.token
			}else{
				this.url=this.$webUrl+"/#/App/Statistics/AppCredit?CompanyId="+this.CompanyId +'&token='+this.token
			}
			setTimeout(function(){
				uni.hideLoading()
			},400)
		},
		methods: {
		}
	}
</script>

<style lang="scss"  scoped>
	
	
</style>